//
//  AboutViewController.m
//  Article
//
//  Created by Haricot_cpc17 on 16/4/27.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    self.tabBarController.tabBar.hidden = YES;
    self.tabBarController.tabBar.translucent = YES;
    [self.navigationController.navigationBar setBarTintColor:UIColorFromRGB(MYColor)];
    
    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    self.navigationController.interactivePopGestureRecognizer.delegate =(id)self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"关于我们";
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"arrow"] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    
    [self.navigationController.navigationBar setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont fontWithName:@"Heiti SC" size:18],
       NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
    [self.navigationController.navigationBar setBarTintColor:UIColorFromRGB(MYColor)];
    
    self.view.backgroundColor = UIColorFromRGB(0xffffff);
    
    [self createUI];
    // Do any additional setup after loading the view.
}
-(void)back{
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)createUI{
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    
    [self.view addSubview:view];
    
    
    UILabel *TextLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, WIDTH - 40, HEIGHT / 4)];
    TextLabel.text = @"【联系我们】\n\n  企业网址: http://www.wangdao.com \n\n  客服热线:0531-66663324 \n\n  售前咨询:15069073600";
    TextLabel.numberOfLines = 0;
    TextLabel.font = [UIFont systemFontOfSize:14 *MYWIDTH];
    TextLabel.textColor = UIColorFromRGB(MYRed);
    [view addSubview:TextLabel];
    
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, HEIGHT / 4, WIDTH - 40, HEIGHT/4)];
    label.text = @"无限制发布广告! \n\n (热门文章每天同步更新ing~~还可以自己发掘好文章，直接粘贴文章+广告并发布)";
    label.numberOfLines = 0;
    label.font = [UIFont systemFontOfSize:12 *MYWIDTH];
    [view addSubview:label];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
